<template>
	<view class="area-b">
		<view class="padding-sm">
			<u-parse :html="content"></u-parse>
		</view>
	</view>
</template>

<script>
	import agrAPI from '@/api/agreement.js'
	export default {
		data() {
			return {
			  content: '',
			  id: '',
			  title: ''
			};
		},
		onLoad({id}){
			this.id = id;
			this.init();
		},
		methods: {
			async init(){
				const {content,title} = await agrAPI.getById(this.id);
				this.content = content;
				this.title = title;
				uni.setNavigationBarTitle({
					title:title
				})
			}
		}
	}
</script>

<style>

</style>
